// base-layout
.layout {
  display: flex;
  flex-direction: column;
  flex: auto;
  background: #edf1f7;
  min-height: 100vh;
  &-has-aside {
    flex-direction: row;
    > .layout {
      overflow: hidden;
    }
  }
  &-aside {
    background: getMenuBg();
    transition: all .2s;
    position: relative;
    min-height: 100%;
    box-shadow: 2px 0 8px rgba(0, 21, 41, .08);
    &.fixed-aside {
      position: fixed;
      top: 0;
      left: 0;
      height: 100%;
      z-index: 12;
    }
    .logo {
      position: relative;
      width: 100%;
      height: 48px;
      overflow: hidden;
      padding-left: 10px;
      .icon {
        width: 36px;
      }
      h1 {
        font-size: 16px;
        margin: 0 0 0 8px;
        white-space: nowrap
        color: getColor();
      }
    }
    &-children {
      height: calc(100% - 48px);
      overflow: hidden;
    }
  }
  &-main {
    position: relative;
    min-height: 100vh;
  }
  &-content-wrap {
    position: relative;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    .table-wrap {
      display: flex;
      .table-right {
        width: calc(100% - 320px);
        padding-left: 16px;
      }
    }
  }
}

// header
.layout-header {
  transition: width .2s;
  flex: 0 0 auto;
  &.fixed-header {
    position: fixed;
    top: 0;
    transition: width .2s;
    z-index: 5;
  }
  .global-header {
    display: flex;
    height: 48px;
    padding: 0;
    background-color: #fff;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .08);
    &.has-border {
      border-bottom: 1px solid #eee;
    }
    &-left {
      display: flex;
      align-items: center;
      .global-header-trigger {
        i {
          position: relative;
        }
      }
      .header-breadcrumb {
        padding: 0 12px;
      }
    }
    &-right {
      display: flex;
    }
    &-trigger {
      display: flex;
      height: 48px;
      padding: 0 12px;
      cursor: pointer;
      align-items: center;
      transition: background-color .2s;
      .f-iconfont {
        vertical-align: -.125em;
        font-size: 18px;
        height: 18px;
        color: $color-text-default;
        line-height: 1;
      }
      &:hover {
        background-color: #f6f6f6;
        .f-iconfont {
          color: $color-text-primary;
        }
      }
      &.light {
        &:hover {
          background-color: #f6f6f6;
        }
      }
    }
    &-avatar-trigger {
      display: flex;
      align-items: center;
      height: 48px;
      padding: 0 10px;
      cursor: pointer;
      outline: none;
      transition: background-color .2s;
      .avatar {
        width: 24px;
        border-radius: 50%;
        margin-right: 10px;
      }
      &:hover {
        background-color: #f6f6f6;
      }
    }
  }
}

// tags-view
.tags-view-container {
  position: relative;
  display: flex;
  height: 42px;
  box-sizing: content-box;
  background-color: #ffffff;
  .fei-tabs-wrapper {
    margin: 0 12px;
    width: calc(100% - 96px);
    .nav-wrapper {
      height: 42px;
      .tab-list {
        margin-top: 5px;
      }
      .tab-item {
        height: 30px;
        line-height: 30px;
        margin-right: 5px;
        font-size: 14px;
        color: #808695;
        padding: 0 10px;
        &::before {
          content: unset;
        }
        &:hover {
          color: getColor();
          border-color: getColor();
        }
        .f-icon-close {
          right: -4px;
          margin-left: 0;
        }
        &.active {
          background:  var(--fei-color-primary-light5);
          border-color: getColor();
          color: getColor() !important;
          .f-icon-close {
            width: 14px;
            color: getColor();
          }
          .f-icon-close:hover {
            color: var(--fei-color-danger-light2);
          }
        }
      }
      .nav-prev, .nav-next {
        line-height: 42px;
      }
    }
    .contextmenu li {
      display: flex;
      align-items: center;
      i {
        margin-right: 4px;
      }
    }
  }
  // 灵动模式
  &.tags-view-clever {
    .fei-tabs-wrapper {
      .nav-wrapper {
        .tab-item {
          position: relative;
          border: 0;
          border-radius: 0;
          padding: 0 16px;
          &:after {
            transition: all .3s cubic-bezier(.645,.045,.355,1),border 0s,color .1s,font-size 0s;
            position: absolute;
            bottom: 0;
            left: 0;
            width: 0;
            height: 2px;
            content: "";
            background-color: var(--fei-color-primary);
          }
          &.active:after  {
            width: 100%;
          }
          &:hover {
            background:  var(--fei-color-primary-light5);
            &:after  {
              width: 100%;
            }
          }
        }
      }
    }
  }

  // 圆滑模式
  &.tags-view-smooth {
    .fei-tabs-wrapper {
      .nav-wrapper {
        .tab-item {
          position: relative;
          border: 0;
          border-radius: 15px;
          padding: 0 18px;
          &:hover {
            background:  #f5f5f5;
          }
        }
      }
    }
  }
  .tags-view-ctrl {
    width: 126px;
    display: flex;
    .trigger {
      width: 42px;
      line-height: 42px;
      color: $color-text-secondary;
      text-align: center;
      cursor: pointer;
      border-left: 1px solid #eee;
      i {
        position: relative;
        font-size: 16px;
        top: -1px;
      }
      &:hover i {
        color: $color-text-primary;
      }
    }
  }
  &:after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 1px;
    bottom: 0;
    background-color: #eee;
  }
}
// menu
.aside-menu {
  height: 100%;
  .fei-scrollbar__wrap {
    overflow-x: hidden;
  }
}
// menu-popup
.fei-menu--popup {
  z-index: 100;
  min-width: 180px;
  border: none;
  padding: 4px 0;
  .fei-menu-item, .fei-submenu__title {
    height: 40px;
    line-height: 40px;
  }
}

.fei-back-top .back-top{
  display: flex;
  justify-content: center;
  align-items: center;
  width: 42px;
  height: 42px;
  font-size: 26px;
  background: #fff;
  border-radius: 50%;
  box-shadow: var(--fei-shadow-down);
  transition: .25s;
  &:hover{
    color: var(--fei-color-primary);
  }
}

.layout-main-leave-active, .layout-main-enter-active {
  transition: opacity .4s, transform .4s;
}
.layout-main-enter-from {
  opacity: 0;
  transform: translateX(-40px);
}
.layout-main-leave-to {
  opacity: 0;
  transform: translateX(40px);
}
